<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    html,body{
      height: 100%;
      padding: 0;
      margin: 0;
    }
    .main{
      margin: 0 auto;
      width: 700px;
      height: 50%;
      background-color: red;
    }
    .nav{
      height: 50%;
    }
    .frist, .two{
      display: inline-block;
      height: 100%;
      width: 50%;
      background-color: blue;
    }
    .two{
      float: left;
      background-color: yellow;
    }
  </style>
</head>
<body>
  <div class="main"></div>
  <div class="nav">
    <div class="frist"></div>
    <div class="two"></div>
  </div>
</body>
</html>